// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import VueLazyLoad from 'vue-lazyload'
import Vconsole from 'vconsole'
import {Loading, Toast, Swipe, SwipeItem, NavBar, Search, Icon, Tabbar, TabbarItem, Grid, GridItem, Image, Button,
  Cell, CellGroup, Sku, Overlay, SubmitBar, ContactCard, ContactList, ContactEdit, AddressList, AddressEdit, Card,
  RadioGroup, Radio, Tag, Col, GoodsAction, GoodsActionIcon, GoodsActionButton, Checkbox, CheckboxGroup, SwipeCell,
  Row, Tab, Tabs, ActionSheet, List, Popup, Field, Picker, Stepper, NoticeBar} from 'vant'

// 阻止启动生产消息
Vue.config.productionTip = false
let vConsole = new Vconsole()
Vue.use(vConsole)
Vue.use(VueLazyLoad, { // 图片懒加载
  loading: require('./assets/img/loading.gif'), // 加载中图片，一定要有，不然会一直重复加载占位图
  error: require('./assets/img/error.jpg') // 加载失败图片
}).use(Loading).use(Toast).use(Swipe).use(SwipeItem).use(NavBar).use(Search).use(Icon).use(Tabbar)
  .use(TabbarItem).use(Grid).use(GridItem).use(Image).use(Button).use(Cell).use(CellGroup).use(Sku).use(Overlay)
  .use(SubmitBar).use(ContactCard).use(ContactList).use(ContactEdit).use(AddressList).use(AddressEdit).use(Card)
  .use(Radio).use(RadioGroup).use(Tag).use(Col).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton)
  .use(Checkbox).use(CheckboxGroup).use(SwipeCell).use(Row).use(Tab).use(Tabs).use(ActionSheet).use(List).use(Popup)
  .use(Field).use(Picker).use(Stepper).use(NoticeBar)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
